<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;

class GoodsController extends Controller
{
    /**
     * 登录
     *
     * @return \Illuminate\Http\JsonResponse
     */
    public function index(Request $request)
    {
        $type = $request->input('type', 'dynamic');
        $lang = $request->input('lang', 'en');
        $goods = config('goods');
        $data = $goods[$type][$lang];

        return response()->json([
            'data' => $data
        ]);
    }
}
